package com.Utils3D;

import java.nio.FloatBuffer;
import java.util.ArrayList;
import java.util.Vector;

import com.EdificacioAR.DebugLog;


public class Model3D {

	public FloatBuffer vertices;
	public Vector<Vector3> faceNormals;
	public FloatBuffer vertexNormals;
	public FloatBuffer texCoords;
	public FloatBuffer colors;
	public ArrayList<MeshGroup> groups;
	public ArrayList<MeshGroup> occluderGroups;
	
	
	
	public Model3D() {
		faceNormals = new Vector<Vector3>();
		groups = new ArrayList<MeshGroup>();
		occluderGroups = new ArrayList<MeshGroup>();
	}

	
	/* The getters convert the Buffer data to arrays to be used by the native code */
	public float[] getVertices() {
		return vertices.array();
	}

	public float[] getVertexNormals() {
		return vertexNormals.array();
	}

	public float[] getTexCoords() {
		return texCoords.array();
	}
	
	public float[] getColors() {
		return colors.array();
	}
	
	public MeshGroup[] getMeshGroups() {
		return (MeshGroup[]) groups.toArray();
	}
	
	public int getGroupsCount() {
		return groups.size();
	}
	
	public MeshGroup getMeshGroup(int i) {
		return groups.get(i);
	}
	
	public MeshGroup[] getOccluderGroups() {
		return (MeshGroup[]) occluderGroups.toArray();
	}
	
	public int getOccluderGroupsCount() {
		return occluderGroups.size();
	}
	
	public MeshGroup getOccluderGroup(int i) {
		return occluderGroups.get(i);
	}

	
	
}
